package org.ccg.servlet

import java.util.Date
import javax.servlet.Servlet
import javax.servlet.ServletConfig
import javax.servlet.ServletRequest
import javax.servlet.ServletResponse

class HelloServlet : Servlet {
    override fun init(p0: ServletConfig?) {
    }

    override fun getServletConfig(): ServletConfig? {
        return null
    }

    override fun service(req: ServletRequest, res: ServletResponse) {
        val out= res.writer
        out.print( Date())
        System.out.println("这是我的第一个Servlet")
    }

    override fun getServletInfo(): String? {
        return null
    }

    override fun destroy() {
    }

}